package com.service.student.imp;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.dao.student.MenuDao;
import com.po.Record;
import com.po.StudentChoose;
import com.po.StudentComment;
import com.po.TodayMenu;
import com.po.TomorrowMenu;
import com.service.student.MenuService;
@Service
public class MenuServiceImp  implements MenuService{
	@Resource(name="menuDaoImp")
	private MenuDao menuDao;
	
	@Override
	public List<TodayMenu> queryTodayMenuList(String date) {
		// TODO Auto-generated method stub
		return menuDao.queryTodayMenuList(date);
	}
	
	@Override
	public int addStudentComment(StudentComment stuComment) {
		// TODO Auto-generated method stub
		return menuDao.addStudentComment(stuComment);
	}
	
	@Override
	public List<TodayMenu> getTodayMenuList(String date) {
		// TODO Auto-generated method stub
		return menuDao.getTodayMenuList(date);
	}

	@Override
	public List<TomorrowMenu> getTomorrowMenuLsit(String date) {
		// TODO Auto-generated method stub
		return menuDao.getTomorrowMenuList(date);
	}

	@Override
	public int updateTomorrowMenuList(StudentChoose stuChoose) {
		// TODO Auto-generated method stub
		return menuDao.updateTomorrwoMenuList(stuChoose);
	}

	@Override
	public int changeRecord(Record record) {
		// TODO Auto-generated method stub
		return menuDao.changeRecord(record);
		
	}

	@Override
	public Record queryRecord(Record record) {
		// TODO Auto-generated method stub
		Record result = menuDao.queryRecord(record);
		if(result != null){
			return result;
		}
		else{
			return null;
		}
	}	

}
